package com.foxzzz.binary.search;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Solution69  {
    public int mySqrt(int x) {
        int low = 0;
        int high = x;
        while (low<=high){
            int mid = (low + high) >> 1;
            int mid2 = mid * mid;
            if(mid2 == x) return mid;
            if(mid!=0&&mid > x / mid)
                high = mid - 1;
            else
                low = mid + 1;
        }
        return high;
    }

    public static void main(String[] args) {

        //System.out.println(new Solution69().mySqrt(1));
        System.out.println(new SimpleDateFormat("HH:mm").format(new Date()));
    }
}
